package jzqb.po;


import cnki.tpi.kbatis.annotation.Column;
import jzqb.vo.Field;
import lombok.Data;

@Data
public class SubscritpDataPo {

    @Column("用户ID")
    private String userId;

    @Column("资源库")
    private String resource;

    @Column("资源ID")
    private String resourceId;

    @Column("题名")
    private String title;

    @Column("领域")
    private String area;

    @Column("已读时间")
    private String readTime;

    @Column("作者")
    private String author;

    @Column("领域")
    private String field;

    @Column("资源库")
    private String tableName;

    @Column("资源ID")//唯一标识符
    private Integer sysID;

    //转换后台显示领域中文格式
    public String getField() {
        if (Field.ONE.getDbCode().equals(this.field)) {
            return Field.ONE.getShowName();
        } else if (Field.TWO.getDbCode().equals(this.field)) {
            return Field.TWO.getShowName();
        } else if (Field.THREE.getDbCode().equals(this.field)) {
            return Field.THREE.getShowName();
        } else if (Field.FOUR.getDbCode().equals(this.field)) {
            return Field.FOUR.getShowName();
        } else if (Field.FIVE.getDbCode().equals(this.field)) {
            return Field.FIVE.getShowName();
        } else if (Field.SIX.getDbCode().equals(this.field)) {
            return Field.SIX.getShowName();
        } else if (Field.SEVEN.getDbCode().equals(this.field)) {
            return Field.SEVEN.getShowName();
        } else if (Field.EIGHT.getDbCode().equals(this.field)) {
            return Field.EIGHT.getShowName();
        } else {
            return Field.NINE.getDbCode();
        }
    }
}
